package reaction.europarl.index;

import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;

public class Proceeding {
	
	String text;
	String id;

	
	public Proceeding(String text, String id) {
		this.text = text;
		this.id = id;
	}
		
	public Document luceneDoc() {
	
		Document doc = new Document();
		
		try {
			
			doc.add(new Field("id", this.id, Field.Store.YES, Field.Index.NOT_ANALYZED));
			doc.add(new Field("text", this.text, Field.Store.YES, Field.Index.ANALYZED, Field.TermVector.YES));			
						
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
	return doc;
	}
}
